#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: common_clone_sink_node.py 
@version:
@time: 2022/01/06 
"""
from TapClientCore.T04_logic.Dag01.node.common_clone_source_node import CommonCloneSourceNode


class CommonCloneSinkNode(CommonCloneSourceNode):
    """
    CloneSinkNode
    table_prefix
    table_suffix
    dropType: 对目标端已存在的结构和数据的处理
    syncObjects: [{"type":"table","objectNames":["tableName"]}]
        type: view(oracle), function, procedure
    mqType:""
    tableNameTransform
    fieldsNameTransform
    """

    def __init__(self, name):
        self.id = self.newId
        if isinstance(name, dict):
            self.name = name['name']
        else:
            self.name = name
        self.attribute = self.sole()


if __name__ == '__main__':
    t = CommonCloneSinkNode('auto_mysql')
    print(t.attribute)
